package pprofs

import (
	"fmt"
	"log"
	"net/http"
	_ "net/http/pprof"
)

/*

//cpu检测
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=60
top
tree


//内存检测
go tool pprof http://localhost:6060/debug/pprof/heap
top
tree


*/
//性能剖析
func Init(port int) {
	go func() {
		log.Println(http.ListenAndServe(fmt.Sprintf("localhost:%d", port), nil))
	}()
}
